package smallChanges.lineNumberMapping;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * @author chadd
 *
 */
public class SourceCondenser
{
	
    public static void main(String[] args)
    throws Exception
    {
    	// ccw 
    	FileReader fileReader = new FileReader(args[0]);
    	BufferedReader bufReader = new BufferedReader(fileReader);
    	System.out.println(SourceCondenser.condenseJavaSourceFile(bufReader));
    	
	}
	/**
     * @param reader
     * @throws IOException
     */
    public static String condenseJavaSourceFile(BufferedReader bufReader) throws IOException
    {
        String retBuf = new String();
        String tmpBuf;
        
		while ((tmpBuf = bufReader.readLine()) != null) {
			tmpBuf = tmpBuf.replaceAll("\t+", "");
			tmpBuf = tmpBuf.replaceAll(" ", "");
			retBuf += tmpBuf;
			retBuf += "\n";
		}
        return retBuf;
    }
}